#!/usr/bin/env python
# encoding: utf-8
# @author: liusir
# @file: config.py
# @time: 2021/6/27 2:39 下午

import os
from common.config_utils import ConfigUtils



class Config:
    def __init__(self,config_file_path):
        self.cfg_obj = ConfigUtils( config_file_path )
    @property
    def HOSTS(self):
        hosts_value = self.cfg_obj.read_value( 'default','HOSTS' )
        return hosts_value
    @property
    def TOKEN_VALUE(self):
        toekn_value = self.cfg_obj.read_value( 'default','TOKEN_VALUE' )
        return toekn_value

# local_config = Config()

if __name__=='__main__':
    current_path = os.path.dirname(os.path.abspath(__file__))
    config_file_dir = os.path.join(current_path, '..', 'conf', 'config.ini')
    local_config = Config( config_file_dir )
    print( local_config.TOKEN_VALUE )